package com.jimster.manager
{
	import com.jimster.dispatcher.BedrockDispatcher;
	import com.jimster.logger.Logger;

	public class Jimster
	{
		//Variables
		private static var instance:Jimster;
		
		//Constructor
		public function Jimster( $enforcer:SingletonEnforcer )
		{
		}
		
		private static function initialize():void
		{
			Jimster.instance = new Jimster( new SingletonEnforcer );
		}
		
		//Accessors
		public static function get dispatcher():BedrockDispatcher
		{
			if( !Jimster.instance ) Jimster.initialize();
			return BedrockDispatcher.instance;
		}
		
		public static function get logger():Logger
		{
			if( !Jimster.instance ) Jimster.initialize();
			return Logger.instance;
		}
	}
}

class SingletonEnforcer{};